pub fn convert_base(num_str: &str, to_base: u32) -> String {
    // TODO: 这里写逻辑
    //todo!()
    let vec: Vec<&str> = num_str.split('(').collect();
    let  num1 = vec[0].to_string();
    let vec2: Vec<&str> = vec[1].split(')').collect();
    let  now_base = vec2[0].parse::<u32>().unwrap();

    let mut ans = 0;

    let mut len = num1.len() ;


    for i in num1.chars(){
        if i >= '0' && i <= '9' {
            ans += (i as u32 - '0' as u32) * now_base.pow(len as u32 - 1);
            //println!("{}",ans);
        }else{
           ans += (i as u32 - 'a' as u32 + 10) * now_base.pow(len as u32 - 1);
           //println!("{}",ans);
        }
        len -= 1;
    }
    
    //println!("{}",ans);

    
    let mut ans2 = String::new() ;
    while ans > 0 {
        let t = ans % to_base ;
        if t > 9 {
            match t {
                10 => ans2.push_str("a"),
                11 => ans2.push_str("b"),
                12 => ans2.push_str("c"),
                13 => ans2.push_str("d"),
                14 => ans2.push_str("e"),
                15 => ans2.push_str("f"),
                _ => (),
                
            }
        }else{
            ans2.push_str(&t.to_string());
        }
        ans -= t;
        ans /= to_base ;

    }
    ans2.chars().rev().collect::<String>()
    
}
